public class NumberExtractor {
    public static void main(String[] args) throws InterruptedException {
        String input = "abc123def456ghi789";
        StringBuilder number = new StringBuilder();
        for (char c : input.toCharArray()) {
            if (Character.isDigit(c)) {
                number.append(c);
            } else if (number.length() > 0) {
                System.out.println(number);
                number.setLength(0); 
            }
        }
        if (number.length() > 0) {
            System.out.println(number);
        }
        for(int i = 0;i < 100000; i++){
            for(int j =0;j < i ;j ++){
                System.out.print("=");
            }
            System.out.print("\r");
            Thread.sleep(500);
        }
    }
}